<%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2024/12/23 023
  Time: 15:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>login.jsp</title>
        <script type="text/javascript">
            function reload(img){
                img.src="${pageContext.request.contextPath}/kaptcha?date=" + new Date().getTime();
            }
        </script>
    </head>
    <body>
        欢迎来到login.jsp登录页面！
        <hr/>
        <form action="${pageContext.request.contextPath}/user/login" method="post">
            <div>
                <input type="text" name="captcha" placeholder="请输入验证码" style="width: 100px; height: 30px; border-radius: 3px"/>
                <!-- 在JSP页面中如果项目没有上下文路径，则img src="/kaptcha"，如果有上下文路径，则img src="${pageContext.request.contextPath}/kaptcha" -->
                <img id="img" src="${pageContext.request.contextPath}/kaptcha" onclick="reload(this)" style="width: 100px; height: 36px; cursor: pointer"/>
            </div>
            <div>
                <input type="submit" value="登录" style="width: 100px; height: 30px; border-radius: 3px"/>
            </div>
        </form>
    </body>
</html>
